package SoftwarePrinciple.InterfaceSegregationPrinciple;

/**
 * @author: Themberfue
 * @date: 2025/8/8 11:03
 * @description:
 */
public class Client {
    public static void main(String[] args) {
        // 控制收音机
        System.out.println("=== 控制收音机 ===");
        PowerControl radioPower = new Radio();
        VolumeControl radioVolume = new Radio();
        radioPower.turnOn();
        radioVolume.increaseVolume();
        radioVolume.decreaseVolume();
        radioPower.turnOff();

        // 控制电视机
        System.out.println("\n=== 控制电视机 ===");
        Television tv = new Television();
        tv.turnOn();
        tv.increaseVolume();
        tv.nextChannel();
        tv.previousChannel();
        tv.decreaseVolume();
        tv.turnOff();

        // 控制智能音箱
        System.out.println("\n=== 控制智能音箱 ===");
        PowerControl speakerPower = new SmartSpeaker();
        VolumeControl speakerVolume = new SmartSpeaker();
        speakerPower.turnOn();
        speakerVolume.increaseVolume();
        speakerVolume.increaseVolume();
        speakerPower.turnOff();
    }
}
